package com.guiguli.string_ArrayList;

public class StringCapacity {
    public static void main(String[] args) {
        StringBuilder sb = new StringBuilder();
        //容量:一开始为16，不够使用的时候会*2+2
        //长度:已经装了多少
        System.out.println(sb.capacity());  //16
        System.out.println(sb.length());    //0

        sb.append("abcdefghijklmnopqrstuvwxyz");

        System.out.println(sb.capacity());  //34
        System.out.println(sb.length());    //26
    }
}
